#ifndef VCDRECONNECT_H
#define VCDRECONNECT_H

#include <gtk/gtk.h>


typedef  enum{
    ReconDefault,
    ReconVmUnStart,

    ReconOtherClientLogin
}EStatus;

/// the struct of reconnect
struct StReconnect{
    //  flag of reconnect
    //  true: is reconnecting
    //  false: not reconnecting
    gboolean is_connecting;

    //  timer use for reconnect
    //  callback func is _timer_func_reconnect
    //  create in spicy_reconnect_begin
    //  remove in spicy_reconnect_end
    guint   timer;

    //  the old SpiceWindow
    //  destory when reconnected ok
    //  set by spicy_reconnect_begin
    //  destory by spicy_reconnect_end
    gpointer *win;//

    //  message box
    //  create  in spicy_reconnect_begin()
    //  destory in spicy_reconnect_end()/_spicy_reconnect_message_box_callback()
    GtkWidget* message_box;

    //  set by net callback
    //  use for indiate if continue to reconnect
    EStatus status;

};


extern struct StReconnect g_reconnect;


void vcd_com_reconnect_set_status(EStatus s);

#endif // VCDRECONNECT_H
